package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class WebResponseContextExtensionData implements Sequenceable, Serializable {

    @SerializedName("hasDecorated")
    private boolean isHasDecorated;


    public static final Sequenceable.Producer<WebResponseContextExtensionData> CREATOR = new Producer<WebResponseContextExtensionData>() {
        @Override
        public WebResponseContextExtensionData createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            WebResponseContextExtensionData webResponseContextExtensionData = new WebResponseContextExtensionData();
            webResponseContextExtensionData.unmarshalling(parcel);
            return webResponseContextExtensionData;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeBoolean(this.isHasDecorated);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.isHasDecorated = parcel.readBoolean();
        return true;
    }

    public boolean isHasDecorated() {
        return isHasDecorated;
    }

    public void setHasDecorated(boolean hasDecorated) {
        isHasDecorated = hasDecorated;
    }

    @Override
    public String toString() {
        return "WebResponseContextExtensionData{" +
                "hasDecorated = '" + isHasDecorated + '\'' +
                "}";
    }
}
